
print("YES" if input()==input()[::-1] else "NO" )